require('classic')


-- 初始化一些默认值
function love.load()
    mouseX,mouseY = 30,30
	xList = {60}
	yList = {30}
	speedList = {4, 6}
	accCount = 1
	runState = 0
	gFPS = love.timer.getFPS()
	--love.window.setVSync(false)
end

-- 每一帧更新
function love.update(dt)
	mouseX,mouseY = love.mouse.getPosition()
	mouseState = love.mouse.isDown(1)
	gFPS = love.timer.getFPS()
	
	-- 未点击鼠标时, 匀速下落
	if not mouseState and runState == 0 then
		yList[1] = yList[1] + speedList[1]
	end
	
	if mouseState then
		runState = 10
	end
	
	if runState > 0 then
		yList[1] = yList[1] - speedList[2]
		runState = runState - 1
	end
	
end

-- 绘制
function love.draw()
	love.graphics.print('(' .. mouseX .. ',' .. mouseY .. '),' .. 'FPS:' .. gFPS, 10,10)
    love.graphics.setColor(0, 100, 100)
	love.graphics.circle("fill", xList[1], yList[1], 10)
end